package com.max.exceptions;

import org.springframework.http.HttpStatus;

public class BusinessException extends RuntimeException {

    private final int code;

    private final String msg;

    public BusinessException(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(String msg) {
        super(msg);
        this.msg = msg;
        this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
    }


}
